
from PIL import Image 

angle = 45
img = Image.open("needle.png")
out = img.rotate(angle, expand=True)
for i in range(0,360,6):
    print(str(i))
    out = img.rotate(i, expand=True)
    out.save("needle_"+str(i)+".png")